

//导航轮播图
var mySwiper = new Swiper('.fulist .swiper-container', {
	loop: true,
    autoplay: 5000,
    simulateTouch : false,
    autoplayDisableOnInteraction : false,
    preventClicks : false,
    noSwiping : true,
    prevButton:'.swiper-button-prev',
    nextButton:'.swiper-button-next'
});

//来设计流程轮播图  
var taglist = new Swiper('.swiper-con',{
	loop:true,
	autoplay:3000,
    simulateTouch : false,             //鼠标点击、拖动无效
    onlyExternal:true,                 //禁止手指滑动
	initialSlide:2,
	direction:'vertical'
});

//来设计团队轮播图
var teamlist = new Swiper('.team-container',{
	loop:true,
	autoplay:5000,
    simulateTouch : false,
    autoplayDisableOnInteraction : false,     //解决手机端手指滑动之后无法自动轮播的问题
    pagination:'.team-control',
	paginationClickable :true,
	observer:true,
	watchSlidesProgress : true,
	onSlideChangeStart: function(swiper){
		$('.count').text(swiper.realIndex + 1);
    }
});
$(".per2").text($('.swiper-pagination-bullet').length);

//经典案例的轮播图
var caseLeft = new Swiper('.case-swiper-left .swiper-container',{
	loop:true,
//	autoplay:3000,
	effect:'fade'
});

//经典案例右边轮播图
function caseRight(){
	var num = document.querySelectorAll('.case-right>div');
	if(num%2==0){
		
	}else{
		
	}
}

//设计流程自动播放
var flowlist = $('.flowlist li');
var index = 0;
flowlist.eq(index).addClass('active');

var fTimer = setInterval(flowtimer,3000);
//自动播放方法
function flowtimer(){
	flowlist.eq(index).removeClass('active');
	index++;
	if(index>flowlist.length-1){
		$('.flow-end').addClass('active');
		if(index>flowlist.length){
			index = 0;
			$('.flow-end').removeClass('active');
		}
	}
	flowlist.eq(index).addClass('active');
}
//鼠标mouseover停止自动播放
mouseFunction('.flowlist li');
mouseFunction('.flowlist .flow-end');
function mouseFunction(sel){
	$(sel).mouseover(function(){
		clearInterval(fTimer);
		flowlist.removeClass('active');
		$('.flow-end').removeClass('active');
	})
	$(sel).mouseout(function(){
		fTimer = setInterval(flowtimer,3000);
	})
}


//视频窗口
$('.player-btn').click(function(){
	$('#video-wrap').css('display','block');
    $('video').trigger('play');
})
//关闭按钮的显示
$('#video-wrap .video-player').mouseover(function(){
	$('#video-wrap .player-shut').css('display','block');
})
$('#video-wrap .video-player').mouseout(function(){
    $('#video-wrap .player-shut').css('display','none');
})
//关闭播放器按钮
$('#video-wrap .player-shut').click(function(){
    $('#video-wrap').css('display','none');
    $('video').trigger('pause');
})


/**移动端导航**/
function navBtn(){
    var off = true;
    var navBtn = $("#navBtn"),
        navlist = $(".navlist ul");
    navBtn.on("click",function(){
        if(off){
            navlist.css('height','250px');
            navlist.css('opacity','1');
            off = false;
        }else{
            navlist.css('height','0');
            navlist.css('opacity','0');
            off = true;
        }
    });
}
navBtn();

//跟随导航栏的mouseover 显示下拉列表   手机端


$('#login-wrap .loginbtn').click(function(){
	$('#login-wrap').css('display','none');
	$('.navlogin').eq(0).addClass('active');
	$('.no-login').css('display','none');
	$('.a-login').css('display','block');
})

$('.btn-exit').click(function(){
	$('#web .message-wrap').fadeIn();
})

$('#web .message-wrap .btn-primary').click(function () {
    $('#web .message-wrap').fadeOut();
    $('.navlogin').eq(0).removeClass('active');
    $('.no-login').css('display','block');
    $('.a-login').css('display','none');
})




//$('.nav .navlogin').first().addClass('active');
//$('.no-login').css('display','none');
//$('.a-login').css('display','block');